﻿@inherits MobileComponentBase
@namespace ThingsBlazor.Web.Rcl.Core
@using ThingsBlazor.Core;
@inject UserResoures UserResoures
@*一个完整的AppBar栏，包含手机与电脑的显示切换*@

@if (!IsMobile)
{
    <Breadcrumb />
    <MSpacer />
    <Search />
    <AppbarButtons LanguageChange=@LanguageChange />
}
else
{
    <MSpacer />
    <Logo HeightInt=@(IsMobile?UserResoures.Themes.LayoutPrpo.AppBarHeight:UserResoures.Themes.LayoutPrpo.AppBarHeight+UserResoures.Themes.LayoutPrpo.PageTabsHeight)></Logo>

    <MDialog  Class="pa-1">
        <ActivatorContent>
            <MButton Class="mr-0" Icon Small=IsMobile
                 @attributes="@context.Attrs">
                <MIcon>mdi-magnify</MIcon>
            </MButton>
        </ActivatorContent>
        <ChildContent>
            <MSheet  Class="d-flex  align-center justify-center" Height=@UserResoures.Themes.LayoutPrpo.AppBarHeight>
            <Search />
            </MSheet>
        </ChildContent>
    </MDialog>
}



@code {
    [Parameter]
    public EventCallback<string> LanguageChange { get; set; }
}
